package com.alameda.pojo.history;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Map;

/**
 * 视频播放历史记录实体类
 *
 * @author Lv
 * @date 2024/11/02
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "ap_video_history", autoResultMap = true)
@ApiModel(value = "ApVideoHistoryDO", description = "视频播放历史记录")
public class ApVideoHistoryDO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 视频id
     */
    @ApiModelProperty(value = "视频id")
    @TableField("video_id")
    private Long videoId;

    /**
     * 视频名称
     */
    @ApiModelProperty(value = "视频名称")
    @TableField("video_name")
    private String videoName;

    /**
     * 视频封面
     */
    @ApiModelProperty(value = "视频封面")
    @TableField("video_cover")
    private String videoCover;

    /**
     * 播放时刻
     */
    @ApiModelProperty(value = "播放时刻")
    @TableField("play_moment")
    private Float playMoment;

    /**
     * 创建人id
     */
    @ApiModelProperty(value = "创建人id")
    @TableField("create_id")
    private Long createId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改人id
     */
    @ApiModelProperty(value = "修改人id")
    @TableField("update_id")
    private Long updateId;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 逻辑删除标识符  0 未删除   1 已删除
     */
    @ApiModelProperty(value = "逻辑删除标识符  0 未删除   1 已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    /**
     * 扩展属性
     */
    @ApiModelProperty(value = "扩展属性")
    @TableField(value = "ext_data", typeHandler = FastjsonTypeHandler.class)
    private Map<String, String> extData;

}
